using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FallController : MonoBehaviour
{
    public float fallSpeed = 2f; // 控制下落速度
    public bool isFalling = false;

    void Update()
    {
        if (isFalling)
        {
            Debug.Log("pos:" + transform.position.y);
            this.GetComponent<Animator>().enabled = false;
            transform.position += Vector3.down * fallSpeed * Time.deltaTime;
            if (transform.position.y <= 1.7) {
                this.gameObject.SetActive(false);
            }
        }
    }
}
